<!doctype html>
<html lang="en">	
<head>
	<meta charset="utf-8"/>
	<title>{% block title %}{{ SITENAME }}{%endblock%}</title>	
	<meta name="author" content="{{ AUTHOR }}">
	
	{% block extra_meta %}
	{% endblock %}

	<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
		
    {% if PELICAN_SOBER_STICKY_SIDEBAR %}
	  <script type="text/javascript" src="{{ SITEURL }}/theme/js/custom_scripts.js"></script>
	{% endif %}

	{% block scripts %}
	{% endblock %}

    {% if FEED_ALL_ATOM %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
    {% endif %}
    {% if FEED_ALL_RSS %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
    {% endif %}
</head>
	
<body>
{{ FEED_ATOM }}
    <div class="container">
	  
	  <header>
	    <div class="feeds">
	      {% if FEED_ALL_ATOM %}
	      <a href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="atom feed"/></a>
	      {% endif %}
          {% if FEED_ALL_RSS %}
	  <a href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" rel="alternate"><img src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/icons/feed-32px.png" alt="rss feed"/></a>
          {% endif %}
	    </div>
	    {% if PAGES %}
	      <nav class="pages">
	        {% for p in PAGES %}
			  <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
			  {% if not loop.last %}-{% endif %}
			{% endfor %}
	      </nav>
	    {% endif %}
		<a href="{{ SITEURL }}" class="title">{{ SITENAME }}</a>
      </header>
	
	  <div class="wrapper">

		  <div role="main" class="content">
		    {% block content %}{% endblock %}
		  </div>	
		  
		  <div class="sidebar">
		    <div class="sidebar-container" {% if PELICAN_SOBER_STICKY_SIDEBAR %}id="sidebar-container-fixed"{% endif %}>

	          {% if PELICAN_SOBER_ABOUT %}
	            <aside>
	              <h2>About</h2>
			      <p>
                    {{ PELICAN_SOBER_ABOUT }}
			      </p>
			    </aside>
			  {% endif %}

  	          <nav>
	            <h2>Categories</h2>
	            <ul>
	              {% for cat, null in categories %}
	                <li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
	              {% endfor %}
	            </ul>
	          </nav>

	          {% if SOCIAL %}
	            <aside>
	            <h2>Social</h2>
			      <ul class="social">
				    {% for name, link in SOCIAL %}
				    <li><a href="{{ link }}">{{ name }}</a><i></i></li>
				    {% endfor %}
			      </ul>
			    </aside>
			  {% endif %}

	          {% if LINKS %}
	            <aside>
	              <h2>Blogroll</h2>
	              <ul>
	                {% for name, link in LINKS %}
	                  <li><a href="{{ link }}">{{ name }}</a></li>
	                {% endfor %}
	              </ul>
	            </aside>
	          {% endif %}
	        </div>
		  </div>

	  </div>

      <footer>
		<p role="contentinfo">
		  {{ AUTHOR }} - Proudly powered by <a href="http://alexis.notmyidea.org/pelican/">pelican</a>. Theme <a href="https://github.com/fle/pelican-sober">pelican-sober</a>.
    	</p>

	  </footer>	

	</div>
        {% include "analytics.html" %}
</body>
</html>
